<include file="public@header"/>
</head>
<body>
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('course/index')}">课程列表</a></li>
        <li><a href="{:url('course/add')}">新增课程</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('course/index')}">
        关键字：
        <input class="form-control" type="text" name="title" style="width: 200px;" value="{:input('request.title')}" placeholder="课程名称">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('course/index')}">清空</a>
    </form>
    <form method="post" class="js-ajax-form">
        <table class="table table-hover table-bordered">
            <thead>
            <tr>
                <th>ID</th>
                <th>课程名称</th>
                <th>课程封面</th>
                <th>{:lang('ACTIONS')}</th>
            </tr>
            </thead>
            <tbody>
            <foreach name="list" item="vo">
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo.title}</td>
                    <td>
                        <img src="{:cmf_get_image_url($vo.image)}" width="150px">
                    </td>
                    <td>
                        <a class="btn btn-xs btn-primary" href='{:url("course/edit",array("id"=>$vo["id"]))}'>{:lang('EDIT')}</a>
                        <a class="btn btn-xs btn-danger" href='{:url("course/delete",array("id"=>$vo["id"]))}'>{:lang('DELETE')}</a>
                    </td>
                </tr>
            </foreach>
            </tbody>
        </table>
        <div class="pagination">{$page}</div>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
</body>
</html>